﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebApplication1.Services;

namespace WebApplication1
{
	public partial class _Default : Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			 
		}

		 

		private static void SaveJson(string key, object data)
		{
			var fileCurrentDirectory = System.Environment.CurrentDirectory + "\\Videos";
			var filePath = fileCurrentDirectory + "\\" + key + ".json";
			try
			{
				;
				Directory.CreateDirectory(fileCurrentDirectory);

				File.Delete(filePath);

			}
			catch (Exception)
			{


			}

			File.AppendAllText(filePath, Newtonsoft.Json.JsonConvert.SerializeObject(data));

		}
	}
}